package day5;

public class Teacher extends Person{

	private double salary;
	
	public void teach() {
		System.out.println(name + "正在上课");
	}

	public Teacher() {
		super();
	}

	public Teacher(int id, String name, int age, double salary) {
		super(id, name, age);
		this.salary = salary;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}

	@Override
	public String toString() {
		return "Teacher [id=" + id + ", name=" + name + ", age=" + age + ", salary=" + salary + "]";
	}
	
}
